import React from "react";
import ReactDOM from "react-dom"
import SubCom from "./subCom";

class Index extends React.Component {
    state = {
        age: 19,
        list: [1,2,3]
    }
    render() {
        return (<div><SubCom 
            title="abc" 
            money={100}
            flag={true}
            fn={()=>{console.log('fn函数')}}
            list={this.state.list}
            content={<p><i>我是content</i></p>}
            age={this.state.age}></SubCom></div>)
    }
}

ReactDOM.render(<div><Index/></div>, document.getElementById('root'))